<div class="ant-select ant-select-enabled">
  <div class="ant-select-selection ant-select-selection--multiple">
    <div class="ant-select-selection__rendered">
      <ul>
        <li class="ant-select-selection__choice" *ngFor="let u of users">
          <div class="ant-select-selection__choice__content">{{u.name}}</div>
          <span class="ant-select-selection__choice__remove " *ngIf="enable">
            <i nz-icon="" type="close" (click)="del(u)"></i>
          </span>
        </li>
        <li class="ant-select-selection__choice" style="padding: 0 10px 0 10px;" *ngIf="enable">
          <div class="ant-select-selection__choice__content" (click)="open()">选择</div>
        </li>
      </ul>
    </div>
  </div>
</div>

<nz-modal nzWidth='940' nzTitle="租户选择" [nzMaskClosable]='false' [nzFooter]="null" [(nzVisible)]="fs.isEditVisible"
  (nzOnCancel)="fs.closeEdit()">
  <div class="user-work">
    <!-- 查询框 -->
    <div class="top">
      <input nz-input placeholder="名称" class="fm-input" [(ngModel)]="fs.queryObject['name:like']" />
      <nz-select [(ngModel)]="fs.queryObject['type']" class="fm-input"
        (nzOpenChange)="typeDic.load('0')" name="stype" [nzPlaceHolder]="'性质'">
        <nz-option *ngFor="let option of typeDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
        </nz-option>
        <nz-option *ngIf="typeDic.isLoading" nzDisabled nzCustomContent>
          <i nz-icon type="loading" class="loading-icon"></i>加载中...
        </nz-option>
      </nz-select>
      <nz-button-group>
        <button nz-button nzType="primary" (click)="fs.loadData(true)">查询</button>
        <button nz-button (click)="fs.resetQueryObject() && fs.loadData(true)">重置</button>
      </nz-button-group>
      <div class="tool-right">
        <button nz-button [nzType]="'primary'" (click)="select()">选择</button>
      </div>
    </div>
    <!-- 右则样表单主体 -->
    <div class="work-content">
      <div class="table">
        <nz-table #rowSelectionTable nzSize="middle" nzShowSizeChanger [nzPageSizeOptions]='[ 10, 15, 20, 30, 40, 50 ]'
          [nzFrontPagination]="false" [nzData]="fs.datas" [nzLoading]="fs.isLoading || fs.isDeleing"
          [nzTotal]="fs.rowsCount" [(nzPageIndex)]="fs.pageIndex" [(nzPageSize)]="fs.pageSize"
          (nzPageIndexChange)="fs.loadData()" (nzPageSizeChange)="fs.loadData(true)">
          <thead (nzSortChange)="fs.sort($event)" nzSingleSort>
            <tr>
              <th nzShowCheckbox [(nzChecked)]="fs.allChecked" [nzIndeterminate]="fs.indeterminate"
                (nzCheckedChange)="fs.checkAll($event)"></th>
              <th>名称</th>
              <th>规模(人)</th>
              <th>性质</th>
              <th>联系人</th>
            </tr>
          </thead>
          <tbody>
            <tr *ngFor="let data of rowSelectionTable.data">
              <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="fs.refreshCheckStatus()">
              </td>
              <td>{{data.name}}</td>
              <td>{{data.size}}</td>
              <td>{{data.typeName}}</td>
              <td>{{data.contacts}}</td>
            </tr>
          </tbody>
        </nz-table>
      </div>
    </div>
  </div>
</nz-modal>